import axiosInstance from "../axiosInstance";


const customInfo = {
    checkLogin({ zh, custom_pwd }) {
        return axiosInstance.post(`/customInfo/checkLogin`, {
            zh, custom_pwd
        })
    },
    register({ custom_realName, custom_pwd, custom_tel, custom_email,
        custom_sex, custom_birthday, custom_addr, custom_photo }) {
        return axiosInstance.post(`/customInfo/register`, {
            custom_realName, custom_pwd, custom_tel, custom_email,
            custom_sex, custom_birthday, custom_addr, custom_photo
        })
    },
    validateCustomTelExists(custom_tel) {
        return axiosInstance.get(`/customInfo/validateCustomTelExists/${custom_tel}`);
    },
    validateCustomEmailExists(custom_email) {
        return axiosInstance.get(`/customInfo/validateCustomEmailExists/${custom_email}`);
    },
    uploadMyPassword({oldPassword, newPassword}) {
        return axiosInstance.post(`/customInfo/uploadMyPassword`, {oldPassword, newPassword});
    },
}
    


export default customInfo;